<template>
    <view class="b-image-box">
		<view class="b-image-title">图片展示</view>
		<view class="b-image-inner">
			 <image class="picStyle"
				v-for="(item, index) in list" 
				:src="item"
				:key="index"
				@tap="previewImage(index)"
				></image>
		</view>
    </view>
</template>

<script>
export default {
    props: {
        list: {
            type: Array,
            required: true,
        },
    },
    methods: {
        previewImage(index) {
            uni.previewImage({
                urls: this.list.map(item => item), // 图片列表
                current: index, // 当前显示图片的索引
                indicator: 'default' // 图片指示器样式，默认为圆点
            })
        }
    }
}
</script>
<style scoped lang="less">
	.b-image-box{
		padding:20px;
		box-sizing: border-box;
		width: 100%;
		.b-image-title{
			font-size: 14px;
			font-family: PingFang-SC-Medium, PingFang-SC;
			font-weight: 500;
			color: #8d8d8d;
			line-height: 20px;
			margin-bottom: 17px;
		}
		.b-image-inner{
			width: 100%;
			display: flex;
			justify-content: space-between;
			.picStyle{
				width: 45%;
				height: 150px;
				display: block;
			}
		}
	}
</style>